import request from '@/utils/request'

// 获取会员列表（分页）
export function vipInfoList(data) {
  return request({
    url: '/api/vip/vipInfo/getList',
    method: 'POST',
    data
  })
}

// 会员列表删除
export function delVipInfo(id) {
  return request({
    url: `/api/vip/vipInfo/${id}`,
    method: 'DELETE'
  })
}
// 获取信息
export function vipLevelInfo(id) {
  return request({
    url: `/api/vip/vipInfo/${id}`,
    method: 'GET'
  })
}

// 新增
export function addVipInfo(data) {
  return request({
    url: '/api/vip/vipInfo',
    method: 'POST',
    data
  })
}

// 编辑
export function editVipInfo(data, id) {
  return request({
    url: `/api/vip/vipInfo/${id}`,
    method: 'PUT',
    data
  })
}

// 基地列表
export function baseManageList() {
  return request({
    url: '/api/zgyf/BaseManage/Selector',
    method: 'get'
  })
}
// 启用停用
export function vipInfoState(id, data) {
  return request({
    url: `/api/vip/vipInfo/state/${id}`,
    method: 'PUT',
    data
  })
}

// 下载模板
export function TemplateDownload() {
  return request({
    url: `/api/vip/vipInfo/TemplateDownload`,
    method: 'GET'
  })
}

// 导入
export function ImportData(data) {
  return request({
    url: '/api/vip/vipInfo/ImportData',
    method: 'post',
    data
  })
}

// 催缴会费
export function vipInfoReminders(data) {
  return request({
    url: `/api/vip/vipInfo/Reminders`,
    method: 'PUT',
    data
  })
}

// 会员等级列表
export function vipLevelList(data) {
  return request({
    url: `/api/vip/vipLevel/Selector`,
    method: 'POST',
    data
  })
}

// 会员申请
export function registerVipInfo(data) {
  return request({
    url: '/api/vip/vipInfo/register',
    method: 'POST',
    data
  })
}

// 导出数据
export function ExportExcel(data) {
  return request({
    url: `/api/vip/vipInfo/ExportExcelData`,
    method: 'get',
    data
  })
}

// 预览
export function ImportPreview(data) {
  return request({
    url: `/api/vip/vipInfo/ImportPreview`,
    method: 'get',
    data
  })
}
